package org.yly.game.rpggame.domain.model;

/**
 * 属性升级算法
 * 
 * @author makefu
 * 
 */
public abstract class PropertyUpgrade {

	public int upgrade(PropertyName propertyName, int level) {
		if (propertyName.isRed()) {
			return this.upgradeRed(level);
		} else if (propertyName.isBlue()) {
			return upgradeBlue(level);
		} else if (propertyName.isHarm()) {
			return upgradeHarm(level);
		} else if (propertyName.isDefense()) {
			return upgradeDefense(level);
		} else if (propertyName.isAgility()) {
			return upgradeAgility(level);
		} else if (propertyName.isAccurate()) {
			return upgradeAccurate(level);
		} else if (propertyName.isDodge()) {
			return upgradeDodge(level);
		} else if (propertyName.isExpValue()) {
			return upgradeExpValue(level);
		} else if (propertyName.isSkillPoint()) {
			return upgradeSkillPoint(level);
		} else {
			throw new IllegalArgumentException("属性名异常propertyName[" + propertyName + "]");
		}
	}

	public abstract int upgradeRed(int level);

	public abstract int upgradeBlue(int level);
	
	public abstract int upgradeHarm(int level);

	public abstract int upgradeDefense(int level);

	public abstract int upgradeAgility(int level);

	public abstract int upgradeAccurate(int level);

	public abstract int upgradeDodge(int level);

	public abstract int upgradeExpValue(int level);

	public abstract int upgradeSkillPoint(int level);

}
